package org.academiadecodigo.carcrash.field;

/**
 * MIT License
 * (c) 2017 Ricardo Constantino
 */

public enum Direction {
    LEFT,
    RIGHT,
    UP,
    DOWN;

    public Direction next() {
        switch(this) {
            case LEFT:
                return UP;
            case RIGHT:
                return DOWN;
            case UP:
                return RIGHT;
            default:
                return LEFT;
        }
    }
}
